import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 订单信息
 */
@Entity('order_order')
export class OrderOrderEntity extends BaseEntity {
  @Column({ comment: '订单ID' })
  orderNum: string;

  @Column({ comment: '商户订单', nullable: true })
  outTradeNo: string;

  @Column({ comment: '商品名称' })
  goodsName: string;

  @Column({ comment: '商品类型' })
  goodsType: string;

  @Column({ comment: '服务项目' })
  serviceProject: string;

  @Column({ comment: '服务时长天' })
  serviceDay: number;

  @Column({ comment: '状态 0-待支付 1-已支付 2-已完成 3-已取消 4-已退款', default: 0 })
  status: number;

  @Column({ comment: '服务开始时间', type: 'datetime', nullable: true })
  startTime: Date;

  @Column({
    comment: '单价',
    type: 'decimal',
    precision: 10,
    scale: 2,
  })
  price: number;

  @Column({
    comment: '总价',
    type: 'decimal',
    precision: 10,
    scale: 2,
  })
  totalPrice: number;

  @Column({ comment: '被护理人Id' })
  beNurseId: string;

  @Column({ comment: '被护理人地址' })
  beNurseAddressId: string;

  @Column({ comment: '支付人' })
  openid: string;

  @Column({ comment: '支付人Id' })
  createById: string;

  @Column({ comment: '护工ID', nullable: true })
  nurseId: string;

  @Column({ comment: '服务ID', nullable: true })
  serveId: string;

  @Column({ comment: '注意事项' })
  remark: string;

  name: string;

}
